﻿<Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:c="clr-namespace:TagFlo"
    
    x:Class="TagFlo.ImportDialog"
    
    Title="Monitored Directories" Height="500" Width="300"
    Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"
    ResizeMode="NoResize" Loaded="OnInit"
    >
    <Window.Resources>
    <ResourceDictionary>

        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="..\Resources\ResourceDictionary.xaml"/>
            <ResourceDictionary Source="..\Resources\ControlStyle.xaml"/>
            <ResourceDictionary Source="..\Themes\current.theme.xaml"/>
        </ResourceDictionary.MergedDictionaries>
            <c:PathConverter x:Key="PathConverter"/>

        </ResourceDictionary>
</Window.Resources>

    <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0.7*"/>
                <ColumnDefinition Width="0.15*"/>
                <ColumnDefinition Width="0.15*"/>

            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="50"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="40"/>
            </Grid.RowDefinitions>

        <TreeView  x:Name="ImportTree" Grid.RowSpan="1" Grid.ColumnSpan="3" Grid.Row="1" Margin="5,0,5,0">
            <TreeViewItem x:Name="PathTreeViewItem" >
                <TreeViewItem.Header>
                    <DockPanel>
                        <Image Source="/TagFlo;component/Icons/folder.png" Margin="0,0,3,0" />
                        <TextBlock Text="Folders" />
                    </DockPanel>
                </TreeViewItem.Header>
                <TreeViewItem.ItemTemplate>
                    <HierarchicalDataTemplate ItemsSource="{Binding Path=Childs}">
                        <TextBlock Text="{Binding Converter={StaticResource PathConverter}}"></TextBlock>


                    </HierarchicalDataTemplate>
                </TreeViewItem.ItemTemplate>
            </TreeViewItem>
        </TreeView>
        <Button Content="Scan Directories..." Click="Click_ScanDirectories" Grid.Column="0" Grid.Row="2" Margin="15,5,0,5" HorizontalAlignment="Left" Padding="5,1,5,1" Height="30"/>

            <Button Content="+" Click="Click_AddDirectory" IsDefault="True" Grid.Row="2" Grid.Column="2" Width="30" Height="30" FontWeight="Bold" FontSize="20" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="#FF07CE14" Margin="0,3,0,3" ToolTip="Add a new directory."/>
            <Button  Content="-" Click="RemoveDirectoryButton_Click"  Grid.Row="2" Grid.Column="1" Width="30" Height="30" Foreground="#FFD60505" FontSize="20" FontWeight="Bold" Margin="0,3,0,3" ToolTip="Remove selected directory."/>

            <TextBlock Margin="5,10,5,0" VerticalAlignment="Top" Height="40" Text="PhotoTag monitors these directories for new photos. (Close and reopen this window to see changes.)" TextWrapping="Wrap" HorizontalAlignment="Center" Grid.ColumnSpan="3"/>

        </Grid>
    
</Window>
